Conversation
| - returns: The class as an NSDictionary. | ||
| */ | ||
| public func toDictionary() -> NSDictionary { | ||
| open func toDictionary() -> NSDictionary { |
There was a problem hiding this comment.
Cyclomatic Complexity Violation: Function should have complexity 10 or less: currently complexity equals 17 (cyclomatic_complexity)
| } | ||
| else if let propValue:UInt32 = propValue as? UInt32 { | ||
| setValue(propertiesDictionary, value: NSNumber(value: propValue as UInt32), forKey: propName!) | ||
| } |
There was a problem hiding this comment.
Statement Position Violation: Else and catch should be on the same line, one space after the previous declaration. (statement_position)
| } | ||
| else if let propValue:UInt16 = propValue as? UInt16 { | ||
| setValue(propertiesDictionary, value: NSNumber(value: propValue as UInt16), forKey: propName!) | ||
| } |
There was a problem hiding this comment.
Statement Position Violation: Else and catch should be on the same line, one space after the previous declaration. (statement_position)
| } | ||
| else if let propValue:UInt8 = propValue as? UInt8 { | ||
| setValue(propertiesDictionary, value: NSNumber(value: propValue as UInt8), forKey: propName!) | ||
| } |
There was a problem hiding this comment.
Statement Position Violation: Else and catch should be on the same line, one space after the previous declaration. (statement_position)
| } | ||
| else if let propValue:Int64 = propValue as? Int64 { | ||
| setValue(propertiesDictionary, value: NSNumber(value: propValue as Int64), forKey: propName!) | ||
| } |
There was a problem hiding this comment.
Statement Position Violation: Else and catch should be on the same line, one space after the previous declaration. (statement_position)
| var dictionary = [String: AnyObject]() | ||
| open class Serializable: NSObject { | ||
| fileprivate class SortedDictionary : NSMutableDictionary { | ||
| var _dictionary = [String: AnyObject]() |
There was a problem hiding this comment.
Variable Name Violation: Variable name should only contain alphanumeric characters: '_dictionary' (variable_name)
| - returns: The class as a JSON string. | ||
| */ | ||
| public func toJsonString(prettyPrinted: Bool = false) -> String? { | ||
| open func toJsonString(_ prettyPrinted : Bool = false) -> String? { |
There was a problem hiding this comment.
Colon Violation: Colons should be next to the identifier when specifying a type. (colon)
| - returns: The class as JSON, wrapped in NSData. | ||
| */ | ||
| public func toJson(prettyPrinted: Bool = false) -> NSData? { | ||
| open func toJson(_ prettyPrinted : Bool = false) -> Data? { |
There was a problem hiding this comment.
Colon Violation: Colons should be next to the identifier when specifying a type. (colon)
| else if let propValue:UInt32 = propValue as? UInt32 { | ||
| setValue(propertiesDictionary, value: NSNumber(value: propValue as UInt32), forKey: propName!) | ||
| } | ||
| else if let propValue:UInt64 = propValue as? UInt64 { |
There was a problem hiding this comment.
Colon Violation: Colons should be next to the identifier when specifying a type. (colon)
| else if let propValue:UInt16 = propValue as? UInt16 { | ||
| setValue(propertiesDictionary, value: NSNumber(value: propValue as UInt16), forKey: propName!) | ||
| } | ||
| else if let propValue:UInt32 = propValue as? UInt32 { |
There was a problem hiding this comment.
Colon Violation: Colons should be next to the identifier when specifying a type. (colon)
Have not done a lot of checks but is mostly syntaxic changes.